WPF and Silverlight Edition Basic Library > Drop Down > DropDown Features > DropDown Direction |
By default, when the user clicks the C1DropDown control's dropdown arrow at run-time the dropdown will appear below the control, and, if that is not possible, above the control. However, you can customize where you would like the color picker to appear by setting the DropDownDirection property.
To change the drop-down window direction add DropDownDirection="ForceAbove" to the <c1:C1DropDown> tag so that it appears similar to the following:
XAML |
Copy Code
|
---|---|
<c1:C1DropDown Height="30" Name="c1DropDown1" Width="100" DropDownDirection="ForceAbove"/> |
To change the drop-down box direction, add the following code to your project:
Visual Basic |
Copy Code
|
---|---|
Me.C1DropDown1.DropDownDirection = DropDownDirection.ForceAbove |
C# |
Copy Code
|
---|---|
this.c1DropDown1.DropDownDirection = DropDownDirection.ForceAbove;
|
To change the drop-down window direction at run time, complete the following steps:
This will set the DropDownDirection property to the option you chose.